/************************************************************************************
* MediaItem.h                                                                       *
*                                                                                   *
* Copyright (C) 2011 Varuna L Amachi                                                *
*                                                                                   *
* This program is free software; you can redistribute it and/or modify              *
* it under the terms of the GNU General Public License as published by              *
* the Free Software Foundation; either version 2 of the License, or any             *
* later version.                                                                    *
*                                                                                   *
* This program is distributed in the hope that it will be useful, but               *
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY        *
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for       *
* more details. You should have received a copy of the GNU General Public           *
* License along with this program; if not, write to the Free Software Foundation,   *
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA                       *
*                                                                                   *
*************************************************************************************/

#ifndef MEDIAITEM_H
#define MEDIAITEM_H

#include <phonon/MediaSource>
#include <QStringList>

#include "CommonTypes.h"
#include <QUrl>
#include <QImage>



class MediaItem
{
protected:
    Phonon::MediaSource* m_source;
    QString m_trackId;
    QString m_trackName;
    QString m_artistName;
    QString m_albumName;
    QString m_date;
    QString m_genre;
    QString m_description;
    int m_trackNumber;
    int m_duration;
    int m_bitRate;
    int m_sampleRate;
    int m_channels;
/*
      Other information shall be added as and when required..
      Song meta information can be stored here like artist, album etc..
*/

public:
    MediaItem(QString uuid, Phonon::MediaSource *source);
    virtual void setMetaData( QString trackName,
              QString artistName = QString(),
              QString albumName  = QString(),
              QString date       = QString(),
              QString genre      = QString(),
              QString desc       = QString(),
              int trackNum       = 0,
              int lengthInSec    = 1,
              int bitRate        = 0,
              int sampleRate     = 0,
              int channels       = 2);
    QString trackId();
    QString title();
    QString artist();
    QString album();
    QString date();
    QString genre();
    QString description();
    int trackNumber();
    int duration();
    int bitrate();
    int sampleRate();
    int numChannels();
    Phonon::MediaSource* source();
    virtual ~MediaItem();
    virtual QString itemType();
    virtual bool operator ==(MediaItem &other);
    static QString FILE_SYSTEM_ITEM;
};


#endif // MEDIAITEM_H
